import easygui as eg
import sys

while 1:
    eg.msgbox("您好,欢迎使用子涵火影~")
    msg = "请问您想做什么任务呢？默认做生存试炼，您想做什么呢？"
    title = "子涵火影"
    choises = ["生存", "副本", "强者", "查看easygui帮助demo"]
    choise = eg.choicebox(msg, title, choises)

    eg.msgbox("您选择的是：" + str(choise), "结果")
    wdname = '火影忍者Online'
    if choise == choises[3]:
        eg.egdemo()
    elif choise == choise[1]:
        eg.msgbox("todo:这里可以使用multenterbox()填写任务配置")
    elif choise == choises[0]:
        eg.msgbox("你想做生存?")
    elif choise == choises[2]:
        eg.msgbox("你想做什么...")
    else:
        eg.exceptionbox("参数使用不正确","操作非法")
    # 退出or继续?
    msg = "您希望继续完成其他游戏任务吗？"
    title = "请选择"

    # 弹出一个confirm对话框
    if eg.ccbox(msg, title ,default_choice='Continue'):
        pass
    else:
        sys.exit(0)
